import {Component, ViewChild} from '@angular/core';
import {IonicPage, NavController, NavParams, Tabs} from 'ionic-angular';
import {WechatJsSdkProvider} from "@providers/wechat-js-sdk";
import {env} from "@env/environment";

/**
 * Generated class for the CustomerTabsPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-customer-tabs',
  templateUrl: 'customer-tabs.html',
})
export class CustomerTabsPage {

  @ViewChild('tabs') tabs: Tabs;

  cOrderListPage: any = 'CustomerOrderListPage';
  cServerListPage: any = 'CustomerServerListPage';
  messageHomePageRoot = 'MessageHomePage';
  cUserPage: any = 'CustomerMyPage';
  cFWDPage: any ='CustomerAppointmentPage';

  dev:boolean;
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              private wechat:WechatJsSdkProvider) {
    this.dev = env.mode == "prod";
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad CustomerTabsPage');
    this.wechat.saveOpenid();
  }

}
